package practica2;




import weka.core.*;
import weka.classifiers.lazy.IBk;
import weka.classifiers.meta.*;

/**
 * 4. LIBRARYS
 * 
 * @author luciarodero
 */
public class CVParam {
	
	public CVParam(){}
	
	public void paramSelection(Instances data) throws Exception {
		CVParameterSelection ps = new CVParameterSelection();
		ps.setClassifier(new IBk());
		ps.setNumFolds(10); // 10-fold cross validation
		ps.addCVParameter("K 1.0 10.0 10.0"); 
		ps.buildClassifier(data); // build and output best options

		ShowResults sr = new ShowResults();
		sr.printCV(ps);

   }
}
